import type { IExportParamModelData } from "@manycore/custom-miniapp-sdk";
import { listenIdpMsgOnce } from "./helper";

/** 获取导出的方案数据 */
async function getExportJson() {
  const json = await listenIdpMsgOnce('json')
  return json
}

/** 获取参数化模型 */
export async function getParamModels() {
  const json = await getExportJson();
  const paramModels: IExportParamModelData[] = json?.data?.paramModel;
  return paramModels || [];
}